<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<!doctype html>

<html>
    <head>
        <title>登录页</title>
        <link rel="stylesheet" href="/assets/application.css"/>
        <script type="text/javascript" src="/assets/application.js"></script>
    </head>
    <body>
        <div class="container">
            <shiro:user>
                <h1>Hello&nbsp;<shiro:principal defaultValue="World"/></h1>

                <form name="logoutForm" action="/logout" method="post">
                    <input type="submit" class="btn btn-danger" value="退出登录"/>
                </form>
            </shiro:user>

            <br/>

            <form name="loginForm" action="/login" method="post">
                <fieldset>
                    <div class="form-group">
                        <input class="form-control" placeholder="账号" type="text" name="username" value=""/>
                    </div>
                    <div class="form-group">
                        <input class="form-control" placeholder="密码" type="password" name="password" value=""/>
                    </div>
                    <input class="btn btn-lg btn-success btn-block" type="submit" value="登录"/>
                </fieldset>
            </form>
        </div>
    </body>
</html>
